home *** CD-ROM | disk | FTP | other *** search
/ Freelog 125 / Freelog_MarsAvril2015_No125.iso / Musique / Quod Libet / quodlibet-3.3.0-installer.exe / bin / quodlibet / mmkeys / _base.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2014-12-31  |  2KB  |  47 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.7)
  3.  
  4.  
  5. class MMKeysImportError(ImportError):
  6.     pass
  7.  
  8.  
  9. class MMKeysAction(object):
  10.     PLAY = 'play'
  11.     STOP = 'stop'
  12.     PAUSE = 'pause'
  13.     PREV = 'prev'
  14.     NEXT = 'next'
  15.     PLAYPAUSE = 'playpause'
  16.  
  17.  
  18. class MMKeysBackend(object):
  19.     
  20.     def __init_(self, name, callback):
  21.         '''Callback will be called in the main thread and gets
  22.         passed an MMKeysAction. `name` should be the application name.
  23.         '''
  24.         raise NotImplementedError
  25.  
  26.     
  27.     def is_active(cls):
  28.         '''Should return if the backend should be used'''
  29.         return True
  30.  
  31.     is_active = classmethod(is_active)
  32.     
  33.     def grab(self):
  34.         '''Should tell the backend that the application was active
  35.         (e.g. the main window got focused)
  36.         '''
  37.         pass
  38.  
  39.     
  40.     def cancel(self):
  41.         '''After cancel returns the callback will no longer be called.
  42.         Can be called multiple times.
  43.         '''
  44.         raise NotImplementedError
  45.  
  46.  
  47.